<?php
declare (strict_types = 1);

namespace app\index\model\charge;

use think\facade\Db;
use think\Model;

/**
 * @mixin \think\Model
 */
class PileClient extends Model
{
    protected $pk = "id";

    /**
     * 获取设备的通讯记录
     * @param $pileId
     * @return array|null|Model
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    function getInfoByPileId($pileId){
        return $this->where('pile_id',$pileId)->order('id','desc')->find();
    }



}
